package com.atguigu.gmallsuger.service;

import com.atguigu.gmallsuger.bean.ProductStats;
import com.atguigu.gmallsuger.mapper.ProductStatsMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;
import java.util.List;

@Service
public class ProductStatsServiceImpl implements ProductStatsService{
    
    @Autowired
    ProductStatsMapper productStats;
    @Override
    public BigDecimal getGMV(int date) {
        return productStats.getGMV(date);
    }
    
    @Override
    public List<ProductStats> getProductStatsByTM(int date) {
        return productStats.getProductStatsByTM(date);
    }
    
    @Override
    public List<ProductStats> getProductStatsBySpu(int date) {
        return productStats.getProductStatsBySpu(date);
    }
    
    @Override
    public List<ProductStats> getProductStatsByC3(int date, int limit) {
        return productStats.getProductStatsByC3(date, limit);
    }
    
}
